#!/bin/sh

dir="$1"
if [ ! $dir ]; then
    dir="../data"
fi

for f in `find $dir -iname \*.png`; do
    identify -verbose $f | egrep "Comment: (.*)This work is licensed under the Creative Commons Attribution-Share Alike" > /dev/null
    if [ $? == 0 ]; then
        status="ok "
    else
        status="bad"
    fi
    echo "$status $f"
done
